<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Demo</title>
  <style>
  body{
	display:flex;
	justify-content:center;
	align-items:center;
	height:100vh;
	background:linear-gradient(to right,cyan,purple)
  }
  a.layui-btn{
	color:white;
  }
  
  </style>
  <link href="${pageContext.request.contextPath}/frontend/layui/css/layui.css" rel="stylesheet">
</head>
<body>
<form class="layui-form" action="">
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block">
      <input type="text" name="username" lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-block">
      <input type="text" name="password" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
    </div>
  </div>
  
 
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">立即登录</button>
      <a  class="layui-btn layui-btn-primary">注册账号</a>
    </div>
  </div>
</form>
  
<script src="${pageContext.request.contextPath}/frontend/layui/layui.js"></script>
<script src="${pageContext.request.contextPath}/frontend/layui/axios.min.js"></script>

<script>
layui.use(['form', 'laydate', 'util'], function(){
  var form = layui.form;
  var layer = layui.layer;
  var laydate = layui.laydate;
  var util = layui.util;
  
  
});
axios.post('https://api.example.com/submit', {  
    name: 'John Doe',  
    email: 'johndoe@example.com'  
  })  
    .then(function (response) {  
    // 请求成功时处理响应数据  
    console.log(response.data);  
})  
    .catch(function (error) {  
    // 请求失败时处理错误  
    console.error(error);  
});
</script>

</body>
</html>